/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package restAPI;

import internalAPI.Query;
import internalAPI.impl.ExistServer;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.restlet.Request;
import org.restlet.Response;
import org.restlet.data.MediaType;
import org.restlet.data.Status;
import org.restlet.resource.Delete;
import org.restlet.resource.Get;
import org.restlet.resource.Post;
import org.restlet.resource.Put;
import org.restlet.resource.ServerResource;

/**
 *
 * @author ferco
 * Class representing resource for one special place
 */
public class PlaceResource extends Resource{
    
    @Get
    @Override
    public void getXML() {
        
        String place = (String) getRequest().getAttributes().get("place");
        
        Query query = new Query();
         query.setName(place);             
        
        String message = RestAPI.executor.processQuery(query);  
        
        Response.getCurrent().setEntity(message, MediaType.TEXT_XML);
        
    }   
}
